<?php
header("Refresh:1 ;url=./board2.php");

include 'db.php';


$name = $_REQUEST['name'];
$sql = "insert into board(`name`) values('$name')";

$sqls = $conn->prepare($sql);
$ok = $sqls->execute();

if (!isset($name) || empty($name)) {
    exit('请输入餐桌');
}
if ($ok) {
    exit('插入成功');
} else {
    exit('插入失败');
}



